<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="Dashboard">
  <meta name="keyword" content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
  <title>Dashio - Bootstrap Admin Template</title>
  <%@ include file="/include/link_css.jsp"%>
  <script>
    function forword(url) {
        window.location.replace(url);
    }
  </script>
  
</head>

<body>
  <section id="container">
    <!-- **********************************************************************************************************************************************************
        TOP BAR CONTENT & NOTIFICATIONS
        *********************************************************************************************************************************************************** -->
    <!--header start-->
    <%@ include file="/include/header.jsp"%>
    <!--header end-->
    <!-- **********************************************************************************************************************************************************
        MAIN SIDEBAR MENU
        *********************************************************************************************************************************************************** -->
    <!--sidebar start-->
    <%@ include file="/include/sidebar.jsp"%>
    <!--sidebar end-->
    <!-- **********************************************************************************************************************************************************
        MAIN CONTENT
        *********************************************************************************************************************************************************** -->
    <!--main content start-->
    <section id="main-content">
      <section class="wrapper">
        <h3><i class="fa fa-angle-right"></i> Basic Table Examples</h3>

        <!-- row -->
        <div class="row mt">
          <div class="col-md-12">
            <div class="content-panel">
              <table class="table table-striped table-advance table-hover">
                <h4><i class="fa fa-angle-right"></i> Advanced Table</h4>
                <hr>
                <thead>
                  <tr>
                    <th><i class="fa fa-bullhorn"></i> Company</th>
                    <th class="hidden-phone"><i class="fa fa-question-circle"></i> Descrition</th>
                    <th><i class="fa fa-bookmark"></i> Profit</th>
                    <th><i class=" fa fa-edit"></i> Status</th>
                    <th></th>
                  </tr>
                </thead>
                <tbody>
                  <c:forEach var="p" items="${requestScope.plist}">
                  <tr>
                    <td>
                      <a href="showList.jsp#">${p.pid}</a>
                    </td>
                    <td class="hidden-phone">${p.pname}</td>
                    <td>${p.count} </td>
                    <td><span class="label label-info label-mini">${p.unit}</span></td>
                    <td>${p.mark} </td>
                    <td>
                      <button class="btn btn-success btn-xs" onclick="forword('view/product/modify_product.jsp')">添加<i class="fa fa-check"></i></button>
                      <button class="btn btn-primary btn-xs" onclick="forword('showp.do?method=queryID&pid=${p.pid}')">修改<i class="fa fa-pencil"></i></button>
                      <button class="btn btn-danger btn-xs" onclick="forword('modify_product.do?method=del&pid=${p.pid}')">删除<i class="fa fa-trash-o "></i></button>
                    </td>
                  </tr>
                  </c:forEach>
                </tbody>
              </table>
            </div>
            <!-- /content-panel -->
          </div>
          <!-- /col-md-12 -->
        </div>
        <!-- /row -->
      </section>
    </section>
    <!-- /MAIN CONTENT -->
    <!--main content end-->

  </section>
  <%@ include file="/include/link_js.jsp"%>

</body>

</html>
